package com.huawei.hwid.core.datatype;

import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import com.huawei.hms.framework.network.restclient.hianalytics.HianalyticsData;
import com.huawei.hwid.core.d.b.e;
import org.json.JSONException;
import org.json.JSONObject;
import org.xmlpull.v1.XmlPullParser;

public class SiteDefaultInfo implements Parcelable {
    public static final Creator<SiteDefaultInfo> CREATOR = new Creator<SiteDefaultInfo>() {
        public /* synthetic */ Object createFromParcel(Parcel parcel) {
            return a(parcel);
        }

        public /* synthetic */ Object[] newArray(int i) {
            return a(i);
        }

        public SiteDefaultInfo a(Parcel parcel) {
            SiteDefaultInfo siteDefaultInfo = new SiteDefaultInfo();
            siteDefaultInfo.a = parcel.readString();
            siteDefaultInfo.b = parcel.readString();
            siteDefaultInfo.c = parcel.readString();
            return siteDefaultInfo;
        }

        public SiteDefaultInfo[] a(int i) {
            return new SiteDefaultInfo[i];
        }
    };
    public static final String TAG = "SiteDefaultInfo";
    private String a = "";
    private String b = "";
    private String c = "";
    private String d = "";
    private String e = "";

    public static void a(XmlPullParser xmlPullParser, SiteDefaultInfo siteDefaultInfo) {
        try {
            if (HianalyticsData.DOMAIN.equals(xmlPullParser.getAttributeName(0))) {
                JSONObject jSONObject = new JSONObject(xmlPullParser.getAttributeValue(0));
                siteDefaultInfo.a(jSONObject.getString("as").trim());
                siteDefaultInfo.b(jSONObject.getString("cas").trim());
                siteDefaultInfo.d(jSONObject.getString("tms").trim());
                siteDefaultInfo.c(jSONObject.getString("qrs").trim());
                siteDefaultInfo.e(jSONObject.getString("log").trim());
            }
        } catch (JSONException e) {
            e.b(TAG, "parseJSONArrayInfos JSONException: " + e.getClass().getSimpleName(), true);
        } catch (Exception e2) {
            e.b(TAG, "parseJSONArrayInfos Exception: " + e2.getClass().getSimpleName(), true);
        }
    }

    public int describeContents() {
        return 0;
    }

    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(this.a);
        parcel.writeString(this.b);
        parcel.writeString(this.c);
        parcel.writeString(this.e);
    }

    public String a() {
        return this.a;
    }

    public void a(String str) {
        this.a = str;
    }

    public String b() {
        return this.b;
    }

    public void b(String str) {
        this.b = str;
    }

    public void c(String str) {
        this.d = str;
    }

    public void d(String str) {
        this.c = str;
    }

    public void e(String str) {
        this.e = str;
    }
}
